﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;
namespace BLL
{
   public class ManageBLL
    {
        ManageDAL madal = new ManageDAL();
        //public Manage ShowSe(string name)
        //{
        //    return madal.ShowManage().Where(a => a.ManageName == name).FirstOrDefault();
        //}
        public Manage ShowSer(string name)
        {
            return madal.ShowManage().Where(a => a.ManageName == name).FirstOrDefault();
        }
        public bool Dento(Manage id)
        {
            return madal.Dento(id);
        }
        public List<Manage> ShowManage()
        {
            return madal.ShowManage();
        }
        /// <summary>
        /// id显示
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Manage ShowSe(int id)
        {
            return madal.ShowManage().Where(a => a.ManageID == id).FirstOrDefault();
        }
        /// <summary>
        /// 添加购物车
        /// </summary>
        /// <param name="manage"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        public bool Update(Manage manage, int num)
        {
            return madal.Update(manage, num);
        }
        }
}
